﻿<%@ Page Language="C#" MasterPageFile="~/Member/UserManage.master" AutoEventWireup="true"
    CodeFile="ExpoNewsList.aspx.cs" Inherits="Member_Expo_ExpoNewsList" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContInfo" runat="server">

    <script type="text/javascript">
        function SelectAll()
        {
            // 找到所有的 input 元素
            var ctllist = document.getElementsByTagName("input");
            var objcheckbox= document.getElementById("CheckBox2");     
            for( var i = 0; i< ctllist.length; i++)
            {
                if(ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0 )
                {   
                    if(objcheckbox.checked==true)     
                         ctllist[i].checked = true;
                    else
                         ctllist[i].checked = false;
                }
          
             }
         }
    </script>

    <form id="form1" action="">
	<div id="sub_content"> 
            <div class="pagetitle">
                管理展会资讯</div>
			<div class="tishi">
            <span>提&nbsp;示：</span>·慎重修改哦！
			</div>
            <div class="main_Supply_nav">
                <ul>
                    <li class="MenuLiCheck">管理展会资讯</li>
                    <li class="search">
                    <table border="0" cellpadding="0" cellspacing="0" width="510">
                <tr>
                    <td>
                                关键字：<asp:TextBox ID="txtKeyword" runat="server"></asp:TextBox>
                                所属类别:<asp:DropDownList ID="dropExpoNewsType" runat="server">
                                </asp:DropDownList>
                                <asp:Button ID="btnSelect" runat="server" Text="快速查询" OnClick="btnSelect_Click" CssClass="i_button" />                            </td>
                        </tr>
                    </table>
                    </li> 
                </ul>
            </div>
				<asp:GridView ID="grdExpoNews" runat="server" AutoGenerateColumns="False" CellPadding="0"
					Font-Overline="False" OnPageIndexChanging="grdConsultative_PageIndexChanging"
					DataKeyNames="ID" OnRowDataBound="grdExpoNews_RowDataBound" CssClass="table_main">
					<Columns>
						<asp:TemplateField>
							<ItemTemplate>
								<asp:CheckBox ID="CheckBox1" runat="server" />
							</ItemTemplate>
						</asp:TemplateField>
						<asp:TemplateField HeaderText="信息标题">
							<ItemTemplate>
								<%# Eval("Title") %>
							</ItemTemplate>
						</asp:TemplateField>
						<asp:TemplateField HeaderText="所属类别">
							<ItemTemplate>
								<a style="text-decoration: none" href='ExpoNewsList.aspx?TypeID=<%# DataBinder.Eval(Container.DataItem,"TypeID") %>'>
									<%# DataBinder.Eval(Container.DataItem, "Type") %>
								</a>
							</ItemTemplate>
						</asp:TemplateField>
						<asp:TemplateField HeaderText="发布日期">
							<ItemTemplate>
								<%# GetShortDate(DataBinder.Eval(Container.DataItem, "AddDate").ToString())%>
							</ItemTemplate>
						</asp:TemplateField>
						<asp:TemplateField HeaderText="审核">
							<ItemTemplate>
								<asp:Label ID="lbtnUpdate"  Font-Underline="false" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Verify").ToString()== "1" ? "已审核" : "未审核"%>'
								  ></asp:Label>
							</ItemTemplate>
						</asp:TemplateField>
						<asp:TemplateField>
							<HeaderTemplate>
								修改
							</HeaderTemplate>
							<ItemTemplate>
								<a href='ExpoNewsEdit.aspx?id=<%# DataBinder.Eval(Container.DataItem,"ID") %>'>修改</a>
							</ItemTemplate>
						</asp:TemplateField>
					</Columns>
				</asp:GridView>
				<div class="paging">
				 <p><uc1:PageNo ID="PageNo1" runat="server" /></p>
				<asp:Label ID="lblMessage" runat="server" Text="Label" Visible="False"></asp:Label>
				<input id="CheckBox2" name="CheckBox2" onclick="SelectAll();" type="checkbox" /> 全选
				<asp:Button ID="btnDelete" runat="server" Font-Size="9pt" OnClick="btnDelete_Click" Text="批量删除" CssClass="i_button" />
				</div>
				</div>
    </form>
</asp:Content>
